<?php
namespace app\common\traits\wechat;

use Doctrine\Common\Cache\FilesystemCache;

trait WechatCache
{
    /**
     * 缓存微信accssToken, jsapi信息
     * @return FilesystemCache
     */
    protected function wechatCacheDriver()
    {
        $cachePath = sprintf('%s/wechatCache', CACHE_PATH);
        $cacheDriver = new FilesystemCache($cachePath);
        return $cacheDriver;
    }
}


